/**
 * Copyright (C) Study Information Technology, LTD. 
 * All Rights Reserved.
 *
 * Boring20200312.java created on 2020年3月12日 下午3:31:39 by Lyon Lu 
 */
package com.mvc.server.util;

import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

/**
 * <pre>
 * Description:
 * 
 * @author Lyon Lu
 * @date 2020年3月12日 下午3:31:39
 *
 * </pre>
 */
public class Boring20200312 {
	public static void main(String[] args) {
		Stream<Integer> boxed = IntStream.range(0, 10).boxed();
		
		Flux.fromStream(boxed).publishOn(Schedulers.parallel())
		.subscribe(consumer -> {
			int i = consumer/consumer;
			System.err.println(consumer);
		});
		
		try {
			TimeUnit.SECONDS.wait(3);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
